/*
 * @Author: vectorwings
 * @Email: vectorwings@163.com
 * @GitHub: https://github.com/vector-wings/
 * @Company: Copyright 2019 HuaZhuTech, Inc.
 * @Date: 2019-10-21 16:23:25
 * @LastEditors: vectorwings
 * @LastEditTime: 2019-10-21 17:39:56
 * @Description:
 */
// The Vue build version to load with the `import` command
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'
import Util from '#/assets/js/util'
import vfilter from '#/assets/js/vfilter'

Vue.prototype.$axios = axios
import $A from './assets/js/public.js'
Vue.prototype.$A = $A;
import './assets/fonts/iconfont.css' //图标
import store from './vuex/index';
import echarts from 'echarts'
Vue.prototype.$echarts = echarts;
// 公用方法
//Vue.use(Util)
for (let key in vfilter.vfilter) {
  Vue.filter(key, vfilter.vfilter[key])
}
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.less'
Vue.use(Antd)
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.use(MintUI)
Vue.prototype.$openLoading = (o = '') => {
  Vue.$indicator.open({
    text: o,
    spinnerType: 'fading-circle'
  })
}
Vue.prototype.$closeLoading = () => { Vue.$indicator.close() }
import 'typeface-roboto'
import MuseUI from 'muse-ui';
import 'muse-ui/dist/muse-ui.css';
import theme from 'muse-ui/lib/theme';
theme.add('teal', {
  primary: '#0080cb',
  secondary: '#ff4081',
  success: '#24D90C',
  warning: '#fdd835',
  info: '#FF8A1B',
  error: '#FC334E',
  track: '#bdbdbd',
  background: {
    paper: '#FF8A1B',
    chip: '#FF8A1B',
    default: '#FF8A1B'
  },
  fontSize: "14"
}, 'light');

theme.use('teal');
Vue.use(MuseUI);
// 定制css
Vue.prototype.themeAdd = theme.add;
Vue.prototype.themeUse = theme.use;



// 全局样式
import './assets/css/reset.css'
import './assets/css/base.css'
// 动态rem  1rem =  100px
import './assets/js/flexible'
// 导航返回
import './assets/js/xback.js'


//directive
import './directive/close.js'
// 公共组件
import imgUpload from './components/fileUpload/imgUpload'
Vue.use(imgUpload);
import MapShow from './components/mapShow'
Vue.use(MapShow);
import NoData from './components/noData'
Vue.use(NoData);

import successTips from './components/commonModul//successTips'
Vue.use(successTips);
import errorTips from './components/commonModul//errorTips'
Vue.use(errorTips);

import QRcode from './components/QRcode'
Vue.use(QRcode);

import aliPlayer from './components/video/alivideo'
Vue.use(aliPlayer);

import './assets/css/style.scss'
Vue.config.productionTip = false
// import vConsole from 'vconsole';
// new vConsole();
Vue.config.productionTip = false
import 'leaflet/dist/leaflet.css';
//handle  click  to tap
import FastClick from 'fastclick'
FastClick.prototype.focus = function (targetElement) {
  let length;
  if (targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') {
    length = targetElement.value.length;
    targetElement.focus();
    targetElement.setSelectionRange(length, length);
  } else {
    targetElement.focus();
  }
};

FastClick.attach(document.body)
// img preview
import preview from 'vue-photo-preview'
import 'vue-photo-preview/dist/skin.css'
Vue.use(preview)

/* eslint-disable noPoblem-new */
new Vue({
  el: '#hompage',
  router,
  store,
  data: {
    eventHub: new Vue() // 事件中心
  },
  components: { App },
  template: '<App/>'
})
//$A.SS('userInfo', { corpId: "166859688829256086", corpName: "中国建筑第八工程局有限公司", employeeNumber: "210A0248", employeeName: "张昌波", userId: "210A0248", userName: "张昌波" })
//$A.SS('orgInfo', { orgId: "102", orgName: "10101_中建八局机关", type: "0" })//
//$A.SS('orgInfo', { orgId: "60820458500522390", orgName: "金融城测试项目", type: "1" })
//setting  wexin  configs

